<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>锥形渐变</title>
</head>
<body>
    <div style="display: flex;">
        <div class="circle1"></div>
        <div class="circle2"></div>
        <div class="circle3"></div>
        <div class="circle4"></div>
        <div class="circle5"></div>
        <div class="circle6"></div>
    </div>
   
    <style>
        div{
            margin-bottom: 50px;
            margin-right: 20px;
        }
        .circle1 {
            border: 2px solid black;
            width: 150px;
            height: 150px;
            border-radius: 50%;
            background: conic-gradient(#f40 60deg,#000 60deg);
            /* background: conic-gradient(pink 0 30%, yellow 0 70%); */
        }
        .circle2 {
            border: 2px solid black;
            width: 150px;
            height: 150px;
            border-radius: 50%;
            background: conic-gradient(#f40 60deg,#0000 60deg);
        }
        .circle3{
            width: 150px;
            height: 150px;
            border-radius: 50%;
            background: conic-gradient(#f40 60deg,#0000 60deg);
        }
        .circle4{
            width: 150px;
            height: 150px;
            border-radius: 50%;
            --d:0deg;
            background: conic-gradient(#f40 var(--d),#0000 var(--d) calc(360deg - var(--d)),#f40  calc(360deg - var(--d)));
            transition: --d 0.5s;
        }
        @property --d {
            syntax: '<angle>';
            initial-value: 0deg;
            inherits: false;
        }
        .circle4:hover{
            --d:60deg;
        }
        .circle5{
            width: 150px;
            height: 150px;
            border-radius: 50%;
            background: conic-gradient(#f40 ,#ff0,#0f0,#0ff,#00f,#f0f,#f00);
        }
        .circle6{
            width: 150px;
            height: 150px;
            border-radius: 50%;
            background: conic-gradient(#f40 ,#ff0,#0f0,#0ff,#00f,#f0f,#f00);
            position: relative;
        }
        .circle6::before{
            content: '';
            position: absolute;
            background: #fff;
            inset: 5px;
            border-radius: 50%;
        }
    </style>
</body>
</html>